{extend name="main"}
{block name="style"}
<style type="text/css">
	.flex-lable {
		width: 100px;
		color: #6c757d;
		text-align: right;
		padding-right: 10px;
	}

	.el-progress-bar__inner {
		text-align: center;
	}

	.text-2d91f0 {
		color: #2d91f0;
	}
</style>
{/block}
{block name="body"}
<div class="bg-white mb-3">
	<el-form :model="search" @submit.native.prevent="submitForm" ref="search" label-position="right" class="flex py-3">

		<el-form-item label="搜索类型" prop="search_type" class="flex mb-0 pl-3">
			<el-select v-model="search.search_type" placeholder="请选择" class="w-100px">
				<el-option key="id" label="简历ID" value="id"></el-option>
				<el-option key="uid" label="UID" value="uid"></el-option>
				<el-option key="name" label="姓名" value="name"></el-option>
				<el-option key="mobile" label="手机号" value="mobile"></el-option>
				<el-option key="email" label="联系人邮箱" value="email"></el-option>
			</el-select>
		</el-form-item>

		<!--	  <el-form-item label="审核" prop="examine" class="flex mb-0 pl-3">-->
		<!--	  	<el-select v-model="search.examine" placeholder="请选择" class="w-100px">-->
		<!--		    <el-option label="全部"value="all"></el-option>-->
		<!--		    <el-option label="未审核":value="0"></el-option>-->
		<!--		    <el-option label="已审核":value="1"></el-option>-->
		<!--		    <el-option label="驳回":value="2"></el-option>-->
		<!--		</el-select>-->
		<!--	  </el-form-item>-->

		<el-form-item :label="getSearchType()" prop="key" class="flex mb-0 pl-3">
			<el-input v-model="search.key" placeholder="请输入你想搜索的关键词"></el-input>
		</el-form-item>

		<el-form-item class="flex mb-0 pl-3">
			<el-button type="primary" @click="initHtml">查询</el-button>
			<el-button @click="resetForm('search')">重置</el-button>
			<el-link style="margin-left: 10px" :underline="false" type="primary" @click="isShowForm()" @click.native="iconArrow()">高级查询<i :class="DownIcon"></i>
			</el-link>
		</el-form-item>
	</el-form>
	<div style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)">
		<el-tag v-for="tag in AdvancedSearchForm" :key="tag.title" size="small" disable-transitions="true" closable type="warning" @close="handleClose(tag)">
			{{tag.title}}
		</el-tag>
	</div>

	<!--	高级搜索条件的开始-->
	<el-form v-if="iShowAdvancedSearchForm" label-width="120px" :model="AdvancedSearchForm" label-width="80px"
		style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);text-align: justify;" id="RemoveDots">
		<!--		审核条件开始-->
		<el-form-item label="审核状态：" size="mini" ref="examineIts">
			<el-radio-group v-model="examine" @change="advancedSearchRadioChange('examineIts','examine')">
				<el-radio-button v-for="v in examineIts" :label="v.value">{{v.title}}</el-radio-button>
			</el-radio-group>
		</el-form-item>
		<!--		审核条件结束-->
		<!--企业认证条件开始-->
		<el-form-item label="简历类型：" size="mini" ref="recommendTopIts">
			<el-radio-group v-model="resumeType" @change="advancedSearchRadioChange('recommendTopIts','resumeType')">
				<el-radio-button v-for="v in recommendTopIts" :label="v.value">{{v.title}}</el-radio-button>
			</el-radio-group>
		</el-form-item>
		<!--企业认证条件的结束-->

		<!--企业套餐条件开始-->
		<el-form-item label="工作性质：" size="mini" ref="natureOfWorkIts">
			<el-radio-group v-model="natureOfWork" ref="vid" @change="advancedSearchRadioChange('natureOfWorkIts','natureOfWork')">
				<el-radio-button :label="-1">全部</el-radio-button>
				<el-radio-button v-for="v in nature_of_work" :label="v.value">{{v.title}}</el-radio-button>
			</el-radio-group>
		</el-form-item>
		<!--企业套餐条件的结束-->

		<!--到期时间条件开始-->
		<el-form-item label="求职状态：" size="mini" ref="jobStatusIts">
			<el-radio-group v-model="jobStatus" @change="advancedSearchRadioChange('jobStatusIts','jobStatus')">
				<el-radio-button :label="-1">全部</el-radio-button>
				<el-radio-button v-for="v in job_status" :label="v.value">{{v.title}}</el-radio-button>
			</el-radio-group>
		</el-form-item>
		<!--	到期时间的条件结束-->

		<!--最近登录时间条件开始-->
		<el-form-item label="创建时间：" size="mini" ref="createTimeIts">
			<el-radio-group v-model="createTime" @change="advancedSearchRadioChange('createTimeIts','createTime')">
				<el-radio-button v-for="v in createTimeIts" :label="v.value">{{v.title}}</el-radio-button>

			</el-radio-group>
		</el-form-item>
		<!--	最近登录条件的结束-->

		<!--最近注册时间条件开始-->
		<el-form-item label="刷新时间：" size="mini" ref="refreshTimeIts">
			<el-radio-group v-model="refreshTime" @change="advancedSearchRadioChange('refreshTimeIts','refreshTime')">
				<el-radio-button v-for="v in refreshTimeIts" :label="v.value">{{v.title}}</el-radio-button>

			</el-radio-group>
		</el-form-item>
		<!--最近注册时间条件的结束-->


		<el-form-item label="完整度：" size="mini" ref="integrityIts">
			<!--			<el-radio-group  v-model="integrity"  class="flex"   @change="advancedSearchRadioChange('integrityIts','integrity')">-->
			<!--				<el-radio-button   v-for="v in integrityIts" :label="v.value">{{v.title}}</el-radio-button>-->
			<!--			</el-radio-group>-->


			<div class="flex" style="max-width: 400px">
				<el-radio-group v-model="integrity" @change="advancedSearchRadioChange('integrityIts','integrity')">
					<el-radio-button :label="-1" style="margin-right: 10px">全部</el-radio-button>
				</el-radio-group>
				<el-input @focus="integrityFocus" @change="minIntegrityChange" placeholder="开始区间" v-model="minIntegrity">
					<i slot="suffix">%</i>
				</el-input>
				—
				<el-input @focus="integrityFocus" @change="maxIntegrityChange" @input="maxIntegrityChange" @blur="maxIntegrityBlur" placeholder="结束区间"
					v-model="maxIntegrity">
					<i slot="suffix">%</i>
				</el-input>
			</div>

		</el-form-item>

		<!--来源条件开始-->
		<el-form-item label="数据来源：" size="mini" ref="sourceIts">
			<el-radio-group v-model="source" @change="advancedSearchRadioChange('sourceIts','source')">
				<el-radio-button v-for="v in sourceIts" :label="v.value">{{v.title}}</el-radio-button>
			</el-radio-group>
		</el-form-item>
		<!--来源条件的结束-->
		<el-divider>
			<el-button type="text" @click="isNotShowForm()">收起高级查询</el-button>
		</el-divider>
	</el-form>
</div>
<div class="bg-white p-3">
	<div class="table-responsive py-3 flex">
		<el-button type="primary" size="mini" @click="exportResume">导出 {{!selectNum?'':'('+selectNum+')'}}</el-button>
		<el-button type="warning" size="mini" @click="window.open('/message/send')">发消息</el-button>
		<el-button type="success" size="mini" icon="el-icon-refresh" @click="refreshResumeALL">刷新</el-button>
		<el-button type="primary" size="mini" @click="window.open('/resume/addResume')" plain>手动添加简历</el-button>
		<el-button type="primary" size="mini" @click="drawerHandle=true;" plain>设置顾问</el-button>
		<el-button type="success" size="mini" @click="openRefuseWin()" plain>批量审核</el-button>
		<el-popover placement="right" width="300" trigger="click" title="置顶简历">
			<div class="flex flex-center">
				<div class="flex-lable">置顶天数</div>
				<el-input-number v-model="top" :step="1" step-strictly :min="0" size="small" controls-position="right" placeholder="置顶天数"></el-input-number>
			</div>
			<div class="flex flex-center pt-3">
				<div class="flex-lable">是否累加</div>
				<el-checkbox v-model="accumulation" :true-lable="1" :false-lable="0">{{accumulation?'关闭':'开启'}}</el-checkbox>
			</div>
			<div class="bg-light p-2 rounded my-3 text-secondary small">
				<div>0、为取消置顶，n>0、置顶n天</div>
				<div>开启累加之后如若当前置顶时间未到期，则追加天数</div>
			</div>
			<div class="bg-light p-2 rounded my-3 text-secondary small">
			</div>
			<div class="flex">
				<div class="flex-1"></div>
				<el-button type="info" size="mini" :disabled="top>0" @click="setResumeTopAll">取消置顶</el-button>
				<div class="px-1"></div>
				<el-button type="primary" size="mini" :disabled="top<=0" @click="setResumeTopAll">置顶{{top}}天</el-button>
			</div>
			<div slot="reference" class="pl-2">
				<el-button type="success" size="mini">批量置顶</el-button>
			</div>
		</el-popover>
		<el-popover placement="right" width="300" trigger="click" title="推荐简历">
			<div class="flex flex-center">
				<div class="flex-lable">推荐天数</div>
				<el-input-number v-model="recommend" :step="1" step-strictly :min="0" size="small" controls-position="right" placeholder="推荐天数">
				</el-input-number>
			</div>
			<div class="flex flex-center pt-3">
				<div class="flex-lable">是否累加</div>
				<el-checkbox v-model="accumulation" :true-lable="1" :false-lable="0">{{accumulation?'关闭':'开启'}}</el-checkbox>
			</div>
			<div class="bg-light p-2 rounded my-3 text-secondary small">
				<div>0、为取消推荐，n>0、推荐n天</div>
				<div>开启累加之后如若当前推荐时间未到期，则追加天数</div>
			</div>
			<div class="flex">
				<div class="flex-1"></div>
				<el-button type="info" size="mini" :disabled="recommend>0" @click="setResumeRecommendAll">取消推荐</el-button>
				<div class="px-1"></div>
				<el-button type="primary" size="mini" :disabled="recommend<=0" @click="setResumeRecommendAll">推荐{{recommend}}天</el-button>
			</div>
			<div slot="reference" class="pl-2">
				<el-button type="success" size="mini">批量推荐</el-button>
			</div>
		</el-popover>
	</div>
	<div class="table-responsive">
		<el-table ref="tableList" :data="tableData" v-loading="search.ajax" style="width: 100%;" header-cell-class-name="table-header-DDE6FB"
			@expand-change="getResumeInfo" @selection-change="handleSelectionChange">
			<el-table-column type="selection" width="55">
			</el-table-column>
			<el-table-column type="expand" width="20">
				<template slot-scope="scope">
					<div v-if="scope.row.resume_info==1">
						<div class="flex text-dark">
							<div class="flex-1 pr-2">
								<el-divider content-position="left">用户信息</el-divider>
								<div class="flex flex-center pb-3">
									<div class="flex-lable">用户</div>
									<el-image v-if="scope.row.headimg" style="width: 30px; height: 30px" lazy class="rounded-circle mr-2"
										:src="scope.row.headimg" :preview-src-list="[scope.row.headimg]">
									</el-image>
									<div class="flex-1">
										<el-link :href="'/user?uid='+scope.row.uid" target="_blank" :underline="false" title="用户中心">{{scope.row.nickname}}
										</el-link>
									</div>
								</div>
								<div class="flex flex-center pb-3"
									v-if="(!scope.row.adviser_id&&v.adviser_default)||(scope.row.adviser_id&&v.id==scope.row.adviser_id)" v-for="v in admin">
									<div class="flex-lable">顾问</div>
									<el-image v-if="v.headimg" style="width: 30px; height: 30px" lazy class="rounded-circle mr-2" :src="v.headimg"
										:preview-src-list="[v.headimg]">
									</el-image>
									<div class="flex-1">
										<el-link :underline="false">{{v.nickname}}</el-link>
									</div>
								</div>
								<el-divider content-position="left">简历基本信息</el-divider>
								<div class="flex flex-center pb-3">
									<div class="flex-lable">ID</div>
									<div class="flex-1">{{scope.row.data.id}}</div>
								</div>
								<div class="flex flex-center pb-3">
									<div class="flex-lable">姓名</div>
									<div class="flex-1">{{scope.row.data.name}}</div>
								</div>
							</div>
							<div class="flex-1 pl-2">
								<el-divider content-position="left">简历拓展信息</el-divider>
								<!-- <div class="flex flex-center pb-3">
				  				<div class="flex-lable">企业联系人</div>
				  						      				<div class="flex-1">{{scope.row.data.contacts}}</div>
				  			</div>
				  			<div class="flex pb-3">
				  				<div class="flex-lable">公司介绍</div>
				  						      				<div class="flex-1" v-html="XYBase.strntobr(scope.row.data.company_descript)"></div>
				  			</div> -->
							</div>
						</div>
						<div class="py-3">
							<el-button type="primary" size="minism" @click="window.open('/resume/editResume/'+scope.row.id)">
								编辑
							</el-button>
							<el-button type="primary" size="minism" @click="drawerHandleFind=scope.row;drawerHandle=true;">
								设置顾问
							</el-button>
							<el-button type="info" size="minism" @click="window.open('/user/loginLog?uid='+scope.row.uid)">
								登录日志
							</el-button>
							<el-button type="info" size="minism" @click="window.open('/user/apiLog?uid='+scope.row.uid)">
								操作日志
							</el-button>
							<el-button type="info" size="minism" @click="window.open('{:config('web.url')}/resume/'+scope.row.id+'.html')">
								浏览
							</el-button>
							<el-button type="info" size="minism" @click="openWinTo(scope.row)">
								免登录
							</el-button>
						</div>
					</div>
					<div class="text-center py-5 text-secondary small" v-else-if="scope.row.resume_info==0">
						<i class="el-icon-loading mr-2"></i>加载中...
					</div>
					<div class="text-center py-5 text-secondary small" v-else="scope.row.resume_info">
						未获取到用户信息
					</div>
				</template>
			</el-table-column>
			<el-table-column prop="id" label="ID" width="100">
			</el-table-column>
			<el-table-column label="姓名" width="160">
				<template slot-scope="scope">
					<div>
						<el-link type="primary" :href="'/resume/find/'+scope.row.id" target="_blank" :underline="false" title="浏览">{{scope.row.name}}</el-link>
						<div>{{scope.row.mobile}}</div>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="基本信息" min-width="380">
				<template slot-scope="scope">
					<div class="small">
						<div class="flex text-nowrap flex-center font-weight-bold">
							<div>{{XYBase.Date.getMStoYear(scope.row.age*1000)}}岁</div>
							<div class="mx-1">·</div>
							<div v-if="scope.row.sex==1">男</div>
							<div v-else-if="scope.row.sex==2">女</div>
							<div v-else="scope.row.sex">未设置</div>
							<div class="mx-1">·</div>
							<div>{{scope.row.educational_background}}</div>
							<div class="mx-1">·</div>
							<div>{{XYBase.Date.getMStoYear(scope.row.work_experience_time*1000)}}年经验</div>
						</div>
						<div class="flex text-nowrap flex-center" v-for="v in scope.row.ResumeEmploymentIntention">
							<div class="text-2d91f0">{{v.jobs_cate3}}</div>
							<div class="border-left py-1 mx-1"></div>
							<div>{{v.industry?v.industry:'行业不限'}}</div>
							<div class="border-left py-1 mx-1"></div>
							<div v-if="v.area_city">{{v.area_city}}{{v.area_area}}</div>
							<div v-else>地区不限</div>
							<div class="border-left py-1 mx-1"></div>
							<div v-if="v.salary_min>0">{{v.salary_min}}~{{v.salary_max}}</div>
							<div v-else>面议</div>
						</div>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="完整度" width="200">
				<template slot-scope="scope">
					<div class="pr-5">
						<el-progress :percentage="scope.row.progress" :text-inside="true" :stroke-width="16" color="#2d91f0"></el-progress>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="求职状态/浏览" width="260">
				<template slot-scope="scope">
					<div class="small">
						<div>求职状态：{{scope.row.job_status}}</div>
						<div>来源：{{scope.row.app_name}}</div>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="审核/状态" width="120">
				<template slot-scope="scope">
					<div>
						<div class="mb-1">
							<transition>
								<el-button type="success" size="minism" v-if="scope.row.examine==1 || scope.row.examine=='loading'"
									@click="openRefuseWin(scope.row);" :loading="scope.row.examine=='loading'">已审核</el-button>
								<el-button type="info" size="minism" v-else-if="scope.row.examine==0 || scope.row.examine=='loading'"
									@click="openRefuseWin(scope.row);" :loading="scope.row.examine=='loading'">待审核</el-button>
								<el-button type="danger" size="minism" v-else-if="scope.row.examine==2 || scope.row.examine=='loading'"
									@click="setResumeExamine(scope.row,1);" :loading="scope.row.examine=='loading'">未通过</el-button>
							</transition>
						</div>
						<div>
							<transition>
								<el-button type="success" size="minism" v-if="scope.row.privacy==1" @click="setPrivacy(scope.row, 0)">展示中</el-button>
								<el-button type="info" size="minism" v-else="scope.row.privacy==0" @click="setPrivacy(scope.row, 1)">未展示</el-button>
							</transition>
						</div>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="置顶/推荐" width="100">
				<template slot-scope="scope">
					<div>
						<el-popover placement="left" width="300" trigger="click" title="置顶简历">
							<div class="flex flex-center">
								<div class="flex-lable">置顶天数</div>
								<el-input-number v-model="top" :step="1" step-strictly :min="0" size="small" controls-position="right" placeholder="置顶天数">
								</el-input-number>
							</div>
							<div class="flex flex-center pt-3">
								<div class="flex-lable">是否累加</div>
								<el-checkbox v-model="accumulation" :true-lable="1" :false-lable="0">{{accumulation?'关闭':'开启'}}</el-checkbox>
							</div>
							<div class="bg-light p-2 rounded my-3 text-secondary small">
								<p class="text-dark font-weight-bold" v-if="scope.row.top_time">当前置顶结束时间：{{scope.row.top_time}}</p>
								<div>0、为取消置顶，n>0、置顶n天</div>
								<div>开启累加之后如若当前置顶时间未到期，则追加天数</div>
							</div>
							<div class="flex">
								<div class="flex-1"></div>
								<el-button type="info" size="mini" :disabled="top>0" @click="setResumeTop(scope.row)">取消置顶</el-button>
								<div class="px-1"></div>
								<el-button type="primary" size="mini" :disabled="top<=0" @click="setResumeTop(scope.row)">置顶{{top}}天</el-button>
							</div>
							<div slot="reference" class="mb-1">
								<el-button type="success" size="minism" v-if="scope.row.top==1 || scope.row.top==2" :loading="scope.row.top==2">置顶中</el-button>
								<el-button type="info" size="minism" :loading="scope.row.top==2" v-else="scope.row.top==0 || scope.row.top==2">未置顶</el-button>
							</div>
						</el-popover>
						<el-popover placement="left" width="300" trigger="click" title="推荐简历">
							<div class="flex flex-center">
								<div class="flex-lable">推荐天数</div>
								<el-input-number v-model="recommend" :step="1" step-strictly :min="0" size="small" controls-position="right" placeholder="推荐天数">
								</el-input-number>
							</div>
							<div class="flex flex-center pt-3">
								<div class="flex-lable">是否累加</div>
								<el-checkbox v-model="accumulation" :true-lable="1" :false-lable="0">{{accumulation?'关闭':'开启'}}</el-checkbox>
							</div>
							<div class="bg-light p-2 rounded my-3 text-secondary small">
								<p class="text-dark font-weight-bold" v-if="scope.row.top_time">当前推荐结束时间：{{scope.row.recommend_time}}</p>
								<div>0、为取消推荐，n>0、推荐n天</div>
								<div>开启累加之后如若当前推荐时间未到期，则追加天数</div>
							</div>
							<div class="flex">
								<div class="flex-1"></div>
								<el-button type="info" size="mini" :disabled="recommend>0" @click="setResumeRecommend(scope.row)">取消推荐</el-button>
								<div class="px-1"></div>
								<el-button type="primary" size="mini" :disabled="recommend<=0" @click="setResumeRecommend(scope.row)">推荐{{recommend}}天
								</el-button>
							</div>
							<div slot="reference">
								<el-button type="success" size="minism" v-if="scope.row.recommend==1 || scope.row.recommend==2"
									:loading="scope.row.recommend==2">推荐中</el-button>
								<el-button type="info" size="minism" :loading="scope.row.recommend==2"
									v-else="scope.row.recommend==0 || scope.row.recommend==2">未推荐</el-button>
							</div>
						</el-popover>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="创建/更新/刷新时间" width="180">
				<template slot-scope="scope">
					<div class="small">
						<div>{{ scope.row.create_time }}</div>
						<div>{{ scope.row.update_time }}</div>
						<div>{{ scope.row.refresh_time }}</div>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="/" width="200">
				<template slot-scope="scope">
					<el-button type="success" plain round size="minism" @click="Business.openBusiness(scope.row.id)">
						业务
					</el-button>
					<el-button type="primary" plain round size="minism" @click="window.open('/resume/editResume/'+scope.row.uid)">
						编辑
					</el-button>
					<el-button type="danger" plain round size="minism" @click="setResumeDelete(scope)">
						回收站
					</el-button>
				</template>
			</el-table-column>
		</el-table>
	</div>
	<div class="table-responsive py-3 text-center">
		<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="search.page"
			:page-sizes="[10,50,100,200]" :page-size="search.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="search.total">
		</el-pagination>
	</div>
</div>
<el-drawer title="我是标题" :visible.sync="drawerHandle" :with-header="false">
	<div class="wrap h-100">
		<div class="flex px-3 py-2">
			<div class="flex-1 block-title-before py-2">设置顾问</div>
			<div class="py-2">
				<div class="small" v-if="drawerHandleFind.id">{{drawerHandleFind.title}}</div>
				<div class="small" v-else>批量设置</div>
			</div>
		</div>
		<div class="flex1 p-3" style="overflow-y: auto;">
			<div class="flex flex-center border border-lg rounded-lg mb-3 p-3 pointer" v-for="v in admin" :class="{'border-primary':adviser.id==v.id}"
				@click="adviser=v">
				<el-image v-if="v.headimg" style="width: 60px; height: 60px" lazy class="rounded-circle mr-2" :src="v.headimg" :preview-src-list="[v.headimg]">
				</el-image>
				<div class="flex-1">
					<el-link :underline="false">{{v.nickname}}</el-link>
				</div>
				<div class="text-secondary small" v-if="v.adviser_default">默认</div>
			</div>
		</div>
		<div class="flex px-3 py-2">
			<div class="flex-1">
				<el-button @click="drawerHandle=false">关闭</el-button>
			</div>
			<div v-if="drawerHandleFind.id">
				<el-button type="primary" @click="setAdviser(drawerHandleFind)">设置</el-button>
			</div>
			<div v-else>
				<el-button type="primary" @click="setAdviserALL()">设置</el-button>
			</div>
		</div>
	</div>
</el-drawer>
<el-dialog title="审核" :visible.sync="dialogVisible" width="600px" :before-close="cancelRefuseWinSubmit">
	<el-form :model="form" label-width="80px" :rules="rules" ref="form" size="small">
		<el-form-item label="审核" prop="status">
			<el-radio-group v-model="form.status">
				<el-radio :label="1">通过</el-radio>
				<el-radio :label="2">驳回</el-radio>
			</el-radio-group>
		</el-form-item>
		<el-form-item label="驳回原因" prop="msg" v-if="form.status==2">
			<el-input type="textarea" v-model="form.msg" class="col-12 pl-0 pr-0" :autosize="{ minRows: 4, maxRows: 20}" maxlength="200" show-word-limit>
			</el-input>
		</el-form-item>
		<el-form-item label="通知" prop="notice">
			<el-checkbox v-model="form.notice" :true-label="1" :false-label="0">发送通知</el-checkbox>
			<p v-if="form.notice" class="small text-danger">当前发送通知</p>
		</el-form-item>
	</el-form>
	<div class="pointer text-primary small py-1" @click="showLog= !showLog;">{{showLog?'收起日志':'查看日志'}}</div>
	<div v-show="showLog" style="max-height:500px;overflow-y: auto;">
		<div class="py-2 border-bottom mb-2" v-for="(v,index) in rowData.log">
			<div class="flex">
				<div class="text-secondary" v-if="v.status===0">提交申请</div>
				<div class="text-success" v-if="v.status===1">审核通过</div>
				<div class="text-danger" v-if="v.status===2">被驳回</div>
				<div class="flex-1 pl-2">{{v.nickname}}</div>
				<div class="small text-secondary">{{v.create_time}}</div>
			</div>
			<div class="pt-2">{{v.msg}}</div>
		</div>
	</div>
	<div slot="footer">
		<el-button @click="cancelRefuseWinSubmit">取 消</el-button>
		<el-button type="primary" @click="submitForm('form');" :loading="form.ajax">{{form.ajax?'提交中...':'提交'}}</el-button>
	</div>
</el-dialog>
{/block}
{block name="script"}
<script type="text/javascript">
	/*{empty name="admin"}*/
	var admin = [];
	/*{else/}*/
	var admin = JSON.parse('{:json_encode($admin,JSON_UNESCAPED_UNICODE)}');
	/*{/empty}*/
	var nature_of_work = JSON.parse('{:json_encode($nature_of_work)}');
	var job_status = JSON.parse('{:json_encode($job_status)}');
</script>
<script type="text/javascript">
	var vm = new Vue({
		el: '#app',
		computed: {
			natureOfWorkIts() {
				let nat = this.nature_of_work;
				return Object.keys(nat).map((item) => ({ value: item, title: nat[item].title }));
			},
			jobStatusIts() {
				let nat = this.job_status;
				return Object.keys(nat).map((item) => ({ value: item, title: nat[item].title }));
			}
		},
		data: {
			view: XYBase.view,
			labelPosition: 'right',
			multipleSelection: [],
			showLog: false,
			drawerHandle: false,
			drawerHandleFind: {},
			admin: admin,
			adviser: { id: 0 },
			minIntegrity: null,
			maxIntegrity: null,
			//导出的数量
			selectNum: 0,
			//箭头方向，默认向下
			isDownIcon: true,
			DownIcon: "el-icon-arrow-down  el-icon--right",
			//是否显示高级搜索的表单
			iShowAdvancedSearchForm: false,
			//已选择的高级条件标签
			AdvancedSearchTags: [],
			//审核状态单选框，默认为全部
			examine: -1,
			//简历类型单选框，默认为全部
			resumeType: -1,
			//工作性质单选框，默认为全部
			natureOfWork: -1,
			//求职状态单选框，默认为全部
			jobStatus: -1,
			//创建时间单选框，默认为全部
			createTime: -1,
			//刷新时间单选框，默认为全部
			refreshTime: -1,
			//来源单选框，默认为全部
			source: -1,
			//简历完整度单选框，默认为全部
			integrity: -1,
			nature_of_work: nature_of_work,
			job_status: job_status,
			examineIts: [
				{ value: -1, title: "全部" },
				{ value: 0, title: "未审核" },
				{ value: 1, title: "已审核" },
				{ value: 2, title: "驳回" }
			],
			recommendTopIts: [
				{ value: -1, title: "全部" },
				{ value: "recommend", title: "推荐" },
				{ value: "top", title: "置顶" }
			],
			createTimeIts: [
				{ value: -1, title: "全部" },
				{ value: 0, title: "今天" },
				{ value: 3, title: "最近三天" },
				{ value: 7, title: "最近七天" },
				{ value: 30, title: "最近一个月" }
			],
			refreshTimeIts: [
				{ value: -1, title: "全部" },
				{ value: 0, title: "今天" },
				{ value: 3, title: "最近三天" },
				{ value: 7, title: "最近七天" },
				{ value: 30, title: "最近一个月" }
			],
			integrityIts: [
				{ value: -1, title: "全部" },
				{ value: 30, title: "10%-30%" },
				{ value: 50, title: "30%-50%" },
				{ value: 80, title: "50%-80%" },
			],
			sourceIts: [
				{ value: -1, title: "全部" },
				{ value: 1, title: "PC" },
				{ value: 4, title: "H5" },
				{ value: 6, title: "微信小程序" },
				{ value: 2, title: "APP" },
				{ value: 8, title: "抖音小程序" },
				{ value: 9, title: "百度小程序" },
				{ value: 10, title: "支付宝小程序" },
				{ value: 11, title: "快手小程序" },
				{ value: null, title: "后台添加" },
			],
			//高级搜索的表单
			AdvancedSearchForm: [],
			search: {
				/*{notempty name=":request()->get('resume_id')"}*/
				search_type: 'id',
				key: '{:request()->get("resume_id")}',
				/*{elseif request()->get('uid')/}*/
				search_type: 'uid',
				key: '{:request()->get("uid")}',
				/*{elseif request()->get('name')/}*/
				search_type: 'name',
				key: '{:request()->get("name")}',
				/*{elseif request()->get('mobile')/}*/
				search_type: 'mobile',
				key: '{:request()->get("mobile")}',
				/*{elseif request()->get('email')/}*/
				search_type: 'email',
				key: '{:request()->get("email")}',
				/*{else/}*/
				search_type: 'id',
				key: '',
				/*{/notempty}*/
				ajax: false,
				examine: "{:request()->get('examine','all')}",
				page: 1,
				total: 0,
				pageSize: 10
			},
			tableData: [],
			multipleSelectionIndex: 0,
			dialogVisible: false,
			rowData: {},
			top: 0,
			recommend: 0,
			accumulation: 0,
			form: {
				ajax: false,
				status: 1,
				notice: 1,
				msg: ''
			},
			rules: {
				status: [
					{ required: true, message: '请选择审核结果', trigger: 'change' },
				],
				msg: [
					{ required: true, message: '请输入审核结果', trigger: 'blur' },
				],
			}
		},
		watch: {
			view: XYBase.viewWatch,
		},
		created() {
			XYBase.created(this);
		},
		methods: {
			setPrivacy(row, status) {
				$.ajax({
					url: '/resume/setPrivacy',
					type: 'POST',
					contentType: 'application/json;',
					data: JSON.stringify({ id: row.id, privacy: status }),
					success(res) {
						if (res.code == 0) {
							row.privacy = res.data.privacy
						}
					}
				})
			},
			openWinTo(row) {
				this.$confirm('即将免登录打开【' + row.name + '】,是否继续？', '提示', {
					dangerouslyUseHTMLString: true,
					confirmButtonText: '继续',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					window.open('user/exemptLoginRedirect/' + row.uid + '?path=/user');
				}).catch(() => {
					XYBase.msg('已取消');
				});
			},
			toggleSelection(rows) {
				if (rows) {
					rows.forEach(row => {
						this.$refs.tableList.toggleRowSelection(row);
					});
				} else {
					this.$refs.tableList.clearSelection();
				}
			},
			handleSelectionChange(val) {
				this.multipleSelection = val;
				this.selectNum = val.length;
			},
			cancelRefuseWinSubmit(done) {
				this.rowData = {};
				this.$refs.form && this.$refs.form.resetFields();
				typeof done === 'function' && done();
				this.dialogVisible = false;
			},
			openRefuseWin(row) {
				if (row) {
					this.rowData = row;
				} else {
					if (this.multipleSelection.length < 1) return XYBase.msg('请选择简历');
				}
				this.dialogVisible = true;
			},
			submitForm(formName) {
				var _this = this;
				_this.$refs[formName].validate((valid) => {
					if (valid) {
						if (this.rowData.id) {
							_this.setResumeExamine(_this.rowData, _this.form.status);
						} else {
							_this.dialogVisible = false;
							_this.setResumeExamineALL();
						}
					} else {
						return XYBase.warning('请先把表单填写完整。');
					}
				});
			},
			setResumeDelete(scope) {
				var _this = this;
				_this.$confirm('确定将《' + scope.row.name + '》放入回收站吗？', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					$.getJSON('/resume/setResumeDelete/' + scope.row.id, function (ret) {
						if (ret) {
							if (ret.code === 0) {
								_this.tableData.splice(scope.$index, 1);
							} else {
								XYBase.msg(ret.msg);
							}
						} else {
							XYBase.error(XYBase.config.system_network_error);
						}
					});
				}).catch(() => {
					XYBase.msg('已取消');
				});
			},
			refreshResumeALL() {
				var _this = this;
				if (_this.multipleSelection.length < 1) return;
				loading = XYBase.openloading();
				_this.multipleSelectionIndex = 0;
				_this.refreshResumeALLAjax();
			},
			refreshResumeALLAjax() {
				var _this = this;
				var D = _this.multipleSelection[_this.multipleSelectionIndex];
				if (D) {
					loading.setText((_this.multipleSelectionIndex + 1) + '/' + _this.multipleSelection.length);
					$.ajax({
						url: '/resume/refreshResume/' + D.id,
						type: 'get',
						dataType: 'json',
						error: function (err) {
							loading.close();
							_this.multipleSelectionIndex = 0;
							_this.$refs.tableList.clearSelection();
						},
						success: function (ret) {
							if (ret) {
								if (ret.code === 0) {
									_this.multipleSelection[_this.multipleSelectionIndex].refresh_time = ret.data.refresh_time;
									_this.multipleSelectionIndex++;
									_this.refreshResumeALLAjax();
								} else {
									_this.multipleSelectionIndex++;
									_this.refreshResumeALLAjax();
								}
							} else {
								XYBase.error(XYBase.config.system_network_error);
								loading.close();
								_this.multipleSelectionIndex = 0;
								_this.$refs.tableList.clearSelection();
							}
						}
					})
				} else {
					loading.close();
					_this.multipleSelectionIndex = 0;
					_this.$refs.tableList.clearSelection();
				}
			},
			setResumeExamine(row, examine) {
				if (row.examine == 'loading') return;
				var _this = this;
				var oldExamine = row.examine;
				row.examine = 'loading';
				_this.form.ajax = true;
				$.ajax({
					url: '/resume/setResumeExamine',
					type: 'post',
					data: {
						id: row.id,
						status: examine,
						msg: _this.form.msg,
						notice: _this.form.notice
					},
					dataType: 'json',
					error: function (err) {
						_this.form.ajax = false;
						row.examine = oldExamine;
						XYBase.error(XYBase.config.system_network_error);
					},
					success: function (ret) {
						_this.form.ajax = false;
						row.examine = oldExamine;
						if (ret) {
							if (ret.code === 0) {
								row.examine = examine;
								row.update_time = ret.time;
								_this.cancelRefuseWinSubmit();
								XYBase.success(ret.msg);
							} else XYBase.msg(ret.msg);
						} else XYBase.error(XYBase.config.system_network_error);
					}
				})
			},
			setResumeExamineALL() {
				var _this = this;
				if (_this.multipleSelection.length < 1) return;
				loading = XYBase.openloading();
				_this.multipleSelectionIndex = 0;
				_this.setResumeExamineALLAjax();
			},
			setResumeExamineALLAjax() {
				var _this = this;
				var D = _this.multipleSelection[_this.multipleSelectionIndex];
				if (D) {
					loading.setText((_this.multipleSelectionIndex + 1) + '/' + _this.multipleSelection.length);
					$.ajax({
						url: '/resume/setResumeExamine',
						type: 'post',
						data: {
							id: D.id,
							status: _this.form.status,
							msg: _this.form.msg,
							notice: _this.form.notice
						},
						dataType: 'json',
						error: function (err) {
							loading.close();
							_this.multipleSelectionIndex = 0;
							_this.$refs.tableList.clearSelection();
						},
						success: function (ret) {
							if (ret) {
								if (ret.code === 0) {
									_this.multipleSelection[_this.multipleSelectionIndex].examine = _this.form.status;
									_this.multipleSelection[_this.multipleSelectionIndex].update_time = ret.time;
									_this.multipleSelectionIndex++;
									_this.setResumeExamineALLAjax();
								} else {
									_this.multipleSelectionIndex++;
									_this.setResumeExamineALLAjax();
								}
							} else {
								XYBase.error(XYBase.config.system_network_error);
								loading.close();
								_this.multipleSelectionIndex = 0;
								_this.$refs.tableList.clearSelection();
							}
						}
					})
				} else {
					loading.close();
					_this.multipleSelectionIndex = 0;
					_this.$refs.tableList.clearSelection();
					window.location.reload();
				}
			},
			setResumeTop(data) {
				if (data.top == 'loading') return;
				var _this = this, oldStatus = data.top;
				data.top = 'loading';
				$.ajax({
					url: '/resume/setResumeTop',
					data: {
						id: data.id,
						top: _this.top,
						accumulation: _this.accumulation
					},
					type: 'POST',
					dataType: 'json',
					error: function (err) {
						data.top = oldStatus;
						XYBase.error(XYBase.config.system_network_error);
					},
					success: function (ret) {
						data.top = oldStatus;
						if (ret) {
							if (ret.code === 0) {
								data.top = ret.data.top;
								data.top_time = ret.data.top_time;
							} else {
								XYBase.msg(ret.msg);
							}
						} else {
							XYBase.error(XYBase.config.system_network_error);
						}
					}
				});
			},
			setResumeTopAll() {
				var _this = this;
				if (_this.multipleSelection.length < 1) return;
				loading = XYBase.openloading();
				_this.multipleSelectionIndex = 0;
				_this.setResumeTopAllAjax();
			},
			setResumeTopAllAjax() {
				var _this = this;
				var D = _this.multipleSelection[_this.multipleSelectionIndex];
				if (D) {
					loading.setText((_this.multipleSelectionIndex + 1) + '/' + _this.multipleSelection.length);
					$.ajax({
						url: '/resume/setResumeTop',
						data: {
							id: D.id,
							top: _this.top,
							accumulation: _this.accumulation
						},
						type: 'POST',
						dataType: 'json',
						error: function (err) {
							loading.close();
							_this.multipleSelectionIndex = 0;
							_this.$refs.tableList.clearSelection();
						},
						success: function (ret) {
							if (ret) {
								if (ret.code === 0) {
									_this.multipleSelection[_this.multipleSelectionIndex].top = ret.data.top;
									_this.multipleSelection[_this.multipleSelectionIndex].top_time = ret.data.top_time;
									_this.multipleSelectionIndex++;
									_this.setResumeTopAllAjax();
								} else {
									_this.multipleSelectionIndex++;
									_this.setResumeTopAllAjax();
								}
							} else {
								XYBase.error(XYBase.config.system_network_error);
								loading.close();
								_this.multipleSelectionIndex = 0;
								_this.$refs.tableList.clearSelection();
							}
						}
					})
				} else {
					loading.close();
					_this.multipleSelectionIndex = 0;
					_this.$refs.tableList.clearSelection();
				}
			},
			setResumeRecommend(data) {
				if (data.recommend == 'loading') return;
				var _this = this, oldStatus = data.recommend;
				data.recommend = 'loading';
				$.ajax({
					url: '/resume/setResumeRecommend',
					data: {
						id: data.id,
						recommend: _this.recommend,
						accumulation: _this.accumulation
					},
					type: 'POST',
					dataType: 'json',
					error: function (err) {
						data.recommend = oldStatus;
						XYBase.error(XYBase.config.system_network_error);
					},
					success: function (ret) {
						data.recommend = oldStatus;
						if (ret) {
							if (ret.code === 0) {
								data.recommend = ret.data.recommend;
								data.recommend_time = ret.data.recommend_time;
							} else {
								XYBase.msg(ret.msg);
							}
						} else {
							XYBase.error(XYBase.config.system_network_error);
						}
					}
				});
			},
			//点击显示高级表单按钮
			isShowForm: function () {
				this.iShowAdvancedSearchForm = !this.iShowAdvancedSearchForm;
				this.isDownIcon = !this.isDownIcon;
			},
			//鼠标悬停效果
			iconArrow: function () {
				if (this.isDownIcon) {
					this.DownIcon = "el-icon-arrow-down  el-icon--right";
				} else {
					this.DownIcon = "el-icon-arrow-up  el-icon--right";
				}
			},
			//点击收起高级查询按钮
			isNotShowForm: function () {
				this.iShowAdvancedSearchForm = false;
			},
			//高级搜索选择条件的事件
			advancedSearchRadioChange(searchName, modeName) {
				if (modeName == "integrity") {
					this.minIntegrity = null;
					this.maxIntegrity = null;
					// this.advancedSearch();
					// return;
				}
				let _this = this;
				let title = "";
				let isPush = true;
				let numData = _this[searchName];
				//获取当前条件的前缀
				getTitle = numData.map((item) => {
					if (item.value == _this[modeName]) {
						title = item.title;
					}
				})
				//判断当前条件的前缀是否存在
				_this.AdvancedSearchForm.forEach((item, index) => {
					if (item.value == modeName) {
						_this.AdvancedSearchForm.splice(index, 1);
					}
					if (_this[item.value] == -1) {
						_this.AdvancedSearchForm.splice(index, 1);
						isPush = false;
					}
				})
				if (isPush) {
					this.AdvancedSearchForm.push({
						title: _this.$refs[searchName].label + title,
						value: modeName,
						index: _this[modeName]
					})
				}
				//发起请求获取对应条件的列表数据
				this.advancedSearch();
			},
			//高级搜索条件标签关闭
			handleClose: function (tag) {
				let _this = this;
				_this.AdvancedSearchForm.forEach((item, index) => {
					if (item.value == tag.value) {
						_this.AdvancedSearchForm.splice(index, 1);
						_this[item.value] = -1;
					}
				})
				if (_this.integrity == -1) {
					this.minIntegrity = null;
					this.maxIntegrity = null;
				}
				this.advancedSearch();
			},
			//简历完整度手动输入
			minIntegrityChange(value) {
				this.minIntegrity = value;
				this.integrity = -2;
			},
			maxIntegrityChange(value) {
				let _this = this;
				if (_this.minIntegrity == null) {
					XYBase.warning("请输入完整度的开始区间");
					_this.maxIntegrity = null;
					_this.integrity = -1;
					return;
				}
				this.maxIntegrity = value;
				this.integrity = -2;
				this.progressAdvancedSearch();
			},
			//完整度结束区间失去焦点
			maxIntegrityBlur() {
				this.progressAdvancedSearch();
			},
			//完整度的搜索方法
			progressAdvancedSearch() {
				let _this = this;
				_this.integrity = -2;
				if (_this.minIntegrity == null) {
					XYBase.warning("请输入完整度的开始区间");
					_this.maxIntegrity = null;
					_this.integrity = -1;
					return;
				}
				//判断当前条件的前缀是否存在
				let isPush = true;
				_this.AdvancedSearchForm.forEach((item, index) => {
					if (item.value == "integrity") {
						_this.AdvancedSearchForm.splice(index, 1);
					}
					if (_this[item.value] == -1) {
						_this.AdvancedSearchForm.splice(index, 1);
						isPush = false;
					}
				})
				if (isPush) {
					_this.AdvancedSearchForm.push({
						title: _this.$refs.integrityIts.label + _this.minIntegrity + "%-" + _this.maxIntegrity + "%",
						value: "integrity",
						index: _this.minIntegrity + "," + _this.maxIntegrity
					})
				}
				this.advancedSearch();
			},
			//完整度手输入获得焦点
			integrityFocus() {
				this.integrity = -2;
			},
			//高级搜索
			advancedSearch() {
				let _this = this;
				$.ajax({
					url: 'resume/advancedSearch',
					type: 'post',
					data: { searchData: _this.AdvancedSearchForm, page: _this.search.page, pageSize: _this.search.pageSize, total: _this.search.total },
					dataType: 'json',
					error: function (err) {
						XYBase.error(XYBase.config.system_network_error);
					},
					success: function (ret) {
						_this.search.ajax = false;
						if (ret) {
							if (ret.code === 0) {
								_this.search.total = ret.data.total;
								_this.tableData = ret.data.data;
							} else {
								XYBase.msg(ret.msg);
							}
						} else {
							XYBase.error(XYBase.config.system_network_error);
						}
					}
				});
			},
			setResumeRecommendAll() {
				var _this = this;
				if (_this.multipleSelection.length < 1) return;
				loading = XYBase.openloading();
				_this.multipleSelectionIndex = 0;
				_this.setResumeRecommendAllAjax();
			},
			setResumeRecommendAllAjax() {
				var _this = this;
				var D = _this.multipleSelection[_this.multipleSelectionIndex];
				if (D) {
					loading.setText((_this.multipleSelectionIndex + 1) + '/' + _this.multipleSelection.length);
					$.ajax({
						url: '/resume/setResumeRecommend',
						data: {
							id: D.id,
							recommend: _this.recommend,
							accumulation: _this.accumulation
						},
						type: 'POST',
						dataType: 'json',
						error: function (err) {
							loading.close();
							_this.multipleSelectionIndex = 0;
							_this.$refs.tableList.clearSelection();
						},
						success: function (ret) {
							if (ret) {
								if (ret.code === 0) {
									_this.multipleSelection[_this.multipleSelectionIndex].recommend = ret.data.recommend;
									_this.multipleSelection[_this.multipleSelectionIndex].recommend_time = ret.data.recommend_time;
									_this.multipleSelectionIndex++;
									_this.setResumeRecommendAllAjax();
								} else {
									_this.multipleSelectionIndex++;
									_this.setResumeRecommendAllAjax();
								}
							} else {
								XYBase.error(XYBase.config.system_network_error);
								loading.close();
								_this.multipleSelectionIndex = 0;
								_this.$refs.tableList.clearSelection();
							}
						}
					})
				} else {
					loading.close();
					_this.multipleSelectionIndex = 0;
					_this.$refs.tableList.clearSelection();
				}
			},
			getSearchType() {
				var text = '简历ID';
				switch (this.search.search_type) {
					case 'id':
						text = '简历ID';
						break;
					case 'uid':
						text = 'UID';
						break;
					case 'name':
						text = '姓名';
						break;
					case 'mobile':
						text = '手机号';
						break;
					case 'email':
						text = '邮箱';
						break;
				}
				return text;
			},
			resetForm: function (formName) {
				this.$refs[formName].resetFields();
			},
			setAdviser(row) {
				var _this = this;
				if (!_this.adviser.id) return XYBase.msg('请先选择顾问');
				_this.drawerHandle = false;
				var loadinger = XYBase.openloading();
				$.ajax({
					url: '/resume/setAdviser/' + row.id + '/' + _this.adviser.id,
					type: 'get',
					data: {},
					dataType: 'json',
					error: function (err) {
						loadinger.close();
						XYBase.error(XYBase.config.system_network_error);
					},
					success: function (ret) {
						loadinger.close();
						if (ret) {
							if (ret.code === 0) {
								row.adviser_id = _this.adviser.id;
								XYBase.success(ret.msg);
							} else XYBase.msg(ret.msg);
						} else XYBase.error(XYBase.config.system_network_error);
					}
				})
			},
			setAdviserALL() {
				var _this = this;
				if (!_this.adviser.id) return XYBase.msg('请先选择顾问');
				if (_this.multipleSelection.length < 1) return;
				_this.drawerHandle = false;
				loading = XYBase.openloading();
				_this.multipleSelectionIndex = 0;
				_this.setAdviserALLAjax();
			},
			setAdviserALLAjax() {
				var _this = this;
				var D = _this.multipleSelection[_this.multipleSelectionIndex];
				if (D) {
					loading.setText((_this.multipleSelectionIndex + 1) + '/' + _this.multipleSelection.length);
					$.ajax({
						url: '/resume/setAdviser/' + D.id + '/' + _this.adviser.id,
						type: 'get',
						data: {},
						dataType: 'json',
						error: function (err) {
							loading.close();
							_this.multipleSelectionIndex = 0;
							_this.$refs.tableList.clearSelection();
						},
						success: function (ret) {
							if (ret) {
								if (ret.code === 0) {
									_this.multipleSelection[_this.multipleSelectionIndex].adviser_id = _this.adviser.id;
									_this.multipleSelectionIndex++;
									_this.setAdviserALLAjax();
								} else {
									_this.multipleSelectionIndex++;
									_this.setAdviserALLAjax();
								}
							} else {
								XYBase.error(XYBase.config.system_network_error);
								loading.close();
								_this.multipleSelectionIndex = 0;
								_this.$refs.tableList.clearSelection();
							}
						}
					})
				} else {
					loading.close();
					_this.multipleSelectionIndex = 0;
					_this.$refs.tableList.clearSelection();
				}
			},
			handleSizeChange(val) {
				this.search.page = 1;
				this.search.pageSize = val;
				if (this.AdvancedSearchForm.length > 0) {
					this.advancedSearch();
				} else {
					this.initHtml();
				}
			},
			handleCurrentChange(val) {
				this.search.page = val;
				if (this.AdvancedSearchForm.length > 0) {
					this.advancedSearch();
				} else {
					this.initHtml();
				}
			},
			getResumeInfo(row, expandedRows) {
				if (row.resume_info) return;
				$.getJSON('/getResumeInfo/' + row.id, function (ret) {
					if (ret) {
						if (ret.code === 0) {
							row.resume_info = 1;
							row.data = ret.data;
						} else {
							row.resume_info = 2;
							XYBase.msg(ret.msg);
						}
					} else {
						XYBase.error(XYBase.config.system_network_error);
					}
				});
			},
			initHtml() {
				var _this = this;
				_this.search.ajax = true;
				$.ajax({
					url: '',
					type: 'get',
					data: _this.search,
					dataType: 'json',
					error: function (err) {
						_this.search.ajax = false;
						XYBase.error(XYBase.config.system_network_error);
					},
					success: function (ret) {
						_this.search.ajax = false;
						if (ret) {
							if (ret.code === 0) {
								_this.search.total = ret.data.total;
								_this.tableData = ret.data.data;
							} else {
								XYBase.msg(ret.msg);
							}
						} else {
							XYBase.error(XYBase.config.system_network_error);
						}
					}
				});
			},
			exportResume() {
				var _this = this;
				if (_this.selectNum <= 0) {
					XYBase.warning("请选择需要导出的简历");
					return false;
				}
				var loading = XYBase.openloading();
				_this.search.ajax = true;
				_this.search.selectNum = _this.multipleSelection.map(item => item.uid);
				$.ajax({
					url: '/resume/exportResume',
					// type:'get',
					type: 'post',
					data: _this.search,
					dataType: 'json',
					error: function (err) {
						loading.close();
						_this.search.ajax = false;
						XYBase.error(XYBase.config.system_network_error);
					},
					success: function (ret) {
						loading.close();
						_this.search.ajax = false;
						if (ret) {
							if (ret.code === 0) {
								window.open(ret.data.url);
							} else {
								XYBase.msg(ret.msg);
							}
						} else {
							XYBase.error(XYBase.config.system_network_error);
						}
					}
				});
			}
		}
	});
	$(function () {
		vm.initHtml();
		reloadWindowSize();
		$(window).resize(function () {
			reloadWindowSize();
		});
	});
	function reloadWindowSize(argument) {
		var winW = $(window).width();
		if (winW <= 576) {
			vm.labelPosition = 'top';
		} else {
			vm.labelPosition = 'right';
		}
	}
</script>
{include file="business"/}
{/block}